package com.project.class4_8.staticProxy;

public class ProxyLiu implements IEat{
    //继承了接口，同时又聚合这个接口
    /**目标对象*/
    private IEat boss;
    public ProxyLiu(IEat boss){
        this.boss=boss;
    }
    @Override
    public void eat() {
        System.out.println("定餐厅");
        //执行目标对象的目标方法
        boss.eat();
        System.out.println("结账，开发票");
    }
}
